#include <stdio.h>
#include <string.h>

struct jg {
	char name[20];
	int poll;
};

int main() {
	struct jg l[3] = {"wu", 0, "li", 0, "zhang", 0};
	int m, n;
	char d[20];
	for (m = 0; m < 10; m++) {
		scanf ("%s", d);
		for (n = 0; n < 3; n++) {
			if (strcmp(d, l[n].name ) == 0)
				l[n].poll++;
		}
	}
	printf("name\tpoll\n");
	for (m = 0; m < 3; m++)
		printf("%s\t%d\n", l[m].name, l[m].poll);
}

